package com.k7k7.sserver.client;

import java.util.ArrayList;

/**
 * 所有用户管理类
 * @author Administrator
 */
public class ClientMgrS extends ArrayList<ClientS> {

    private static ClientMgrS instance;

    public static ClientMgrS getInstance() {
        if (instance == null) {
            instance = new ClientMgrS();
        }
        return instance;
    }

    public ClientS getClientByID(Long uid) {
        for (ClientS c : this) {
            if (c.user.getId().equals(uid)) {
                return c;
            }
        }
        return null;
    }
}
